package com.csun.cmny.provider.service.impl;

import com.csun.cmny.core.support.BaseService;
import com.csun.cmny.provider.dao.OmcSubscribeMapper;
import com.csun.cmny.provider.model.domain.OmcSubscribe;
import com.csun.cmny.provider.model.dto.SubscribeQueryDto;
import com.csun.cmny.provider.model.dto.subscribe.unsubscribeDto;
import com.csun.cmny.provider.model.vo.subscribe.SubscribeVo;
import com.csun.cmny.provider.service.OmcSubscribeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Service
public class OmcSubscribeServiceImpl extends BaseService<OmcSubscribe> implements OmcSubscribeService {

    @Resource
    private OmcSubscribeMapper omcSubscribeMapper;
    @Override
    public Integer insertSubscribe(OmcSubscribe omcSubscribe) {
        return omcSubscribeMapper.insert(omcSubscribe);
    }

    @Override
    public List<SubscribeVo> selectSubscribe(SubscribeQueryDto subscribeQueryDto) {
        return omcSubscribeMapper.selectSubscribe(subscribeQueryDto);
    }

    @Override
    public int updateState(unsubscribeDto unsubscribeDto) {
        return omcSubscribeMapper.updateState(unsubscribeDto);
    }
}
